package com.zenith.api.po.dto.edu;

import com.zenith.common.base.BaseDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = true)
@Schema(name = "EduExamRecordDTO", description = "考试记录DTO")
public class EduExamRecordDTO extends BaseDTO {
    
    @Schema(description = "主键ID")
    private Long id;
    
    @Schema(description = "考试ID（关联作业表中类型为考试的记录）")
    private Long examId;
    
    @Schema(description = "学生ID")
    private Long studentId;
    
    @Schema(description = "开始考试时间")
    private LocalDateTime startTime;
    
    @Schema(description = "结束考试时间")
    private LocalDateTime endTime;
    
    @Schema(description = "提交时间")
    private LocalDateTime submitTime;
    
    @Schema(description = "学生答案（JSON格式）")
    private String answers;
    
    @Schema(description = "考试得分")
    private BigDecimal score;
    
    @Schema(description = "答对题数")
    private Integer correctCount;
    
    @Schema(description = "总题数")
    private Integer totalCount;
    
    @Schema(description = "实际用时（分钟）")
    private Integer spendTime;
    
    @Schema(description = "考试IP地址")
    private String ipAddress;
    
    @Schema(description = "浏览器信息")
    private String userAgent;
    
    @Schema(description = "异常次数（切屏等）")
    private Integer abnormalCount;
    
    @Schema(description = "异常描述")
    private String abnormalDesc;
    
    @Schema(description = "状态：1-进行中 2-已提交 3-已批改 4-异常终止")
    private Integer status;
    
    @Schema(description = "批改时间")
    private LocalDateTime gradedTime;
    
    @Schema(description = "批改教师ID")
    private Long gradedBy;
}